﻿using System;
using Microsoft.SharePoint;
using MS.InformationManagement.DAL.DocumentCenter;
using Microsoft.SharePoint.Linq;
using System.Linq;

namespace UtilsTesting
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                UtilsTesting.Item found = new UtilsTesting.Item();
                //MS.InformationManagement.DAL.DocumentCenter.Item found = new MS.InformationManagement.DAL.DocumentCenter.Item();
                using (DCDDataContext dx = new DCDDataContext("http://it-529:11/"))
                {
                    found = dx.BibliotecaUsuario.SingleOrDefault(rd => rd.Id.Equals(8));
                    Console.WriteLine(found.Id);
                }
                

            //    using (SPSite site = new SPSite("http://kimiko/sites/documentos"))
            //    {
            //        using (SPWeb web = site.OpenWeb())
            //        {
            //            MS.InformationManagement.Support.Logger.LogException(new Exception("Error inesperado"),
            //                Microsoft.SharePoint.Administration.EventSeverity.ErrorCritical,
            //                MS.InformationManagement.Support.Constants.SPDiagnosticsAreas.SHAREPOINTFOUNDATION,
            //                MS.InformationManagement.Support.Constants.SPDiagnosticsAreas.SharepointFoundationDiagnosticsCategories.GENERAL);
            //        }
            //    }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Something went wrong: {0}", ex.Message);
            }
            Console.ReadKey();
        }
    }
}
